﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KataProfiler
{
    class Utils
    {
        public static void assert(bool b)
        {
            if (!b)
            {
                // Print the error
            }
        }

        public static void memcpy(byte[] dst, int dstOffset, byte[] src, int srcOffset, int len)
        {
            for (int i = 0; i < len; i++)
            {
                dst[dstOffset + i] = src[srcOffset + i];
            }
        }

        public static int setByte(int x, int offset, byte value)
        {
            x = ( ~(0xFF << (offset * 8)) ) & x;
            int tmp = (int)value;
            return ( tmp << (offset * 8) ) | x;
        }
    }
}
